<html>
<head>
<title>ThinMVC Documentation: Configuration</title>
</head>
<body>
<h3>ThinMVC Configuration Values</h3>
      <p>The configuration values are set in a file called &quot;config.php&quot;
        that (usually) exists at the top level of your request next to root.php. The request can
        go directly to root.php like this:</p>
      <p>http://your.site.com/root.php/object/method</p>
      <p>or, if you <a href="configure_apache">configure Apache</a> to work it
        this way, you can silently route all requests through root.php:</p>
      <p>http://your.site.com/object/method</p>
      <h3>Where You'll Find Them</h3>
      <p>Configuration values are set in the $config array:</p>
      <p><em>$config['environment']='dev';</em></p>
      <p>They can then be retrieved inside the controller and views like this:</p>
      <p> <em>$this-&gt;config['environment']</em></p>
      <h3>Standard Values</h3>
      <p>Common values that you'll find are:</p>
      <table width="100%" cellpadding="5" border="1" cellspacing=0>
        <tr>
          <th>value</th>
          <th>definition</th>
          <th width="240">sample</th>
        </tr>

        <tr>
          <td><em>root</em></td>
          <td>the top level folder for the web application</td>
          <td>/var/www/mysite</td>
        </tr>
        <tr>
          <td><em>topurl</em></td>
          <td>the top level of the site</td>
          <td>http://site.com/</td>
        </tr>
        <tr>
          <td><em>appurl</em></td>
          <td>the top level link that takes you to the application</td>
          <td><p>http://site.com/ -or-<br>
              http://site.com/root.php </p></td>
        </tr>
        <tr>
          <td><em>environment</em></td>
          <td>whether this installation is dev, test or prod</td>
          <td>dev, test or prod</td>
        </tr>
        <tr>
          <td><em>default</em></td>
          <td>The default request to use if none other is specified (the URL of your "home" page)</td>
          <td>/mysite/index</td>
        </tr>
        <tr>
          <td><em>viewchain</em></td>
          <td>The series of directories to search for "view" files. The default is "pages". Whenever a "view" is requested ThinMVC will look through each directory in the viewchain, starting at the first in the list, until it finds a match.</td>
          <td>array('pages','mobile','iphone')</td>
        </tr>
      </table>
      <p>Feel free to set whatever other configuration values you need for your
        application--the $config array is a handy place to sock things you'll
        need on multiple pages.</p>

</body>
</html>
